From 29152d30223fc7665aecefed663267a77ea3da88 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sat, 9 Mar 2013 21:12:37 -0500 Subject: [PATCH] layout: Disable the overview hotcorner when we have a full-screen window open For the same reasons that we disable the tray barrier, we should disable hot corners as well -- when users have a full-screen game open, we shouldn't allow overview activation by the hotcorner. https://bugzilla.gnome.org/show_bug.cgi?id=694997 --- js/ui/layout.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/js/ui/layout.js b/js/ui/layout.js index d24d1475c..381676dc4 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -326,7 +326,7 @@ const LayoutManager = new Lang.Class({ continue; } - let corner = new HotCorner(this, cornerX, cornerY); + let corner = new HotCorner(this, monitor, cornerX, cornerY); corner.setBarrierSize(size); this.hotCorners.push(corner); } @@ -1107,13 +1107,15 @@ Signals.addSignalMethods(LayoutManager.prototype); const HotCorner = new Lang.Class({ Name: 'HotCorner', - _init : function(layoutManager, x, y) { + _init : function(layoutManager, monitor, x, y) { // We use this flag to mark the case where the user has entered the // hot corner and has not left both the hot corner and a surrounding // guard area (the "environs"). This avoids triggering the hot corner // multiple times due to an accidental jitter. this._entered = false; + this._monitor = monitor; + this._x = x; this._y = y; @@ -1247,6 +1249,9 @@ const HotCorner = new Lang.Class({ }, _toggleOverview: function() { + if (this._monitor.inFullscreen) + return; + if (Main.overview.shouldToggleByCornerOrButton()) { this._rippleAnimation(); Main.overview.toggle(); -- 2.39.5